package my.mall.admin.api.pojo.goods

import jakarta.validation.Valid
import jakarta.validation.constraints.NotBlank
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Size
import my.mall.admin.api.pojo.goods.detail.AttrInfo
import my.mall.admin.api.pojo.goods.detail.SkuInfo
import my.mall.admin.api.pojo.goods.detail.SpecInfo
import org.hibernate.validator.constraints.Length

class GoodsDetail {
    var id: Long? = null
    var goodsName: @NotBlank(message = "商品名称不能为空") @Length(max = 30) String? = null
    var sellingPoint: String? = null
    lateinit var mainImgUrls: @NotNull(message = "商品主图不能为空") @Size(min = 1, max = 9) List<String>
    var categoryId3: @NotNull(message = "商品分类不能为空") Long? = null
    var goodsPrice: @NotBlank(message = "商品出价不能为空") String? = null
    var subStockType = 0
    var initSalesVolume = 0
    var contentImgUrls: List<String>? = null
    var attrList: List<AttrInfo>? = null
    lateinit var specList: List<SpecInfo>
    lateinit var skuList: @Valid MutableList<SkuInfo>
    var categoryName1: String? = null
    var categoryName2: String? = null
    var categoryName3: String? = null
}
